package com.permission.design.model;

import com.server.meta.MyAnnotation;
import com.solution.framework.model.BaseBean;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: dream
 * Date: 14-4-27
 * Time: 下午12:59
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "t_p_user")
@MyAnnotation(comments = "系统用户")
public class PUser extends BaseBean implements java.io.Serializable {
    @MyAnnotation(comments = "名称")
    private String name;
    @MyAnnotation(comments = "登录名称")
    private String loginname;
    @MyAnnotation(comments = "电子邮件")
    private String email;
    @MyAnnotation(comments = "密码")
    private String password;
    @MyAnnotation(comments = "是否可用")
    private boolean enable;
    @MyAnnotation(comments = "归属部门", relation = "ManyToOne")
    private PDept pDept;
    @MyAnnotation(comments = "用户角色集合", relation = "OneToMany")
    private Set<PUserRole> pUserRoles = new HashSet<PUserRole>();
}
